/**
 * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.babble.subitem.service;

import com.babble.subitem.dto.QueryCollectDTO;
import com.babble.subitem.entity.Collect;
import com.babble.subitem.vo.CollectVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.common.exception.MsgException;

import java.util.List;

/**
 * 收藏表 服务类
 *
 * @author Blade
 * @since 2021-11-21
 */
public interface ICollectService extends IService<Collect> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param collect
	 * @return
	 */
	IPage<CollectVO> selectCollectPage(IPage<CollectVO> page, CollectVO collect);

	/**
	 * 添加收藏
	 * @param id
	 */
    void saveToCol(String id) throws MsgException;

	/**
	 * 删除指定收藏
	 * @param id
	 */
	void delToCol(String id) throws MsgException;

	/**
	 * 分页查找收藏
	 * @param queryCollectDTO
	 * @return
	 */
	List<CollectVO> listColVO(QueryCollectDTO queryCollectDTO);

	/**
	 * 分页查找自己的收藏
	 * @param queryCollectDTO
	 * @return
	 */
	List<CollectVO> listColVOById(QueryCollectDTO queryCollectDTO);
}
